<?php 
if(!isset($_SESSION)) 
{
     session_start(); 
}  
require_once "../model/Db.php";
$model = new Db;

$id = $_POST['id'];

$mod = $_POST['mod'];

if($mod=='dishes'){
    $pk = 'id';
}elseif($mod=='articles'){
    $pk = 'article_id';
}elseif($mod=='image'){
    $pk = 'image_id';
}
$time = time();

$sql = "UPDATE ".$mod." SET status = 0 WHERE ".$pk." = ".$id;                 
mysql_query($sql) or die(mysql_error() . $sql);
?>